﻿<link href="~/Content/ViewStyle/DayDataSignleView.css" rel="stylesheet" />
<div class="modal fade" id="dayModal" ref="dayModal" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel">单点日数据</h4>
                <a href="~/Content/help/SignleDayHelp.htm" target="_blank">帮助文档</a>
            </div>
            <div class="modal-body">
                <table>
                    <tr>
                        <td>设备名称: </td>
                        <td colspan="4">
                            <div class="dropdown">
                                <input name="box" v-model="sourceName">
                                <button type="button" class="btn dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown">
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu  pull-left scrollDropDown" role="menu" aria-labelledby="dropdownMenu1" v-model="sourceName">
                                    <li role="presentation" v-for="item in sourceSource" v-on:click="sourceName = item.id">
                                        <a role="menuitem" tabindex="-1">{{item.name}}</a>
                                    </li>
                                </ul>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>点名称: </td>
                        <td colspan="4">
                            <div class="dropdown">
                                <input name="box" v-model="quantityName">
                                <button type="button" class="btn dropdown-toggle" id="dropdownMenu2" data-toggle="dropdown">
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu  pull-left scrollDropDown" role="menu" aria-labelledby="dropdownMenu2" v-model="quantityName">
                                    <li role="presentation" v-for="item in quantitySource" v-on:click="quantityName = item.id">
                                        <a role="menuitem" tabindex="-1">{{item.name}}</a>
                                    </li>
                                </ul>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>年份值或单元格: </td>
                        <td colspan="4"><input v-model="year" /></td>
                    </tr>
                    <tr>
                        <td>月份值或单元格: </td>
                        <td colspan="4"><input v-model="month" /></td>
                    </tr>
                    <tr>
                        <td>日: </td>
                        <td colspan="4">
                            <div class="dropdown">
                                <input name="box" v-model="day">
                                <button type="button" class="btn dropdown-toggle" id="dropdownMenu3" data-toggle="dropdown">
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu  pull-left scrollDropDown" role="menu" aria-labelledby="dropdownMenu3" v-model="day">
                                    <li role="presentation" v-for="item in dayDataSource" v-on:click="day = item.value">
                                        <a role="menuitem" tabindex="-1">{{item.dis}}</a>
                                    </li>
                                </ul>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>数值计算方式: </td>
                        <td colspan="4">
                            <select v-model="hourDataCalcMode">
                                <option v-for="item in hourDataSource" v-bind:value="item.value">
                                    {{item.dis}}
                                </option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td><input type="checkbox" v-model="usedTimeRange1">启用时段1: </td>
                        <td>
                            从
                        </td>
                        <td>
                            <div class="dropdown">
                                <input name="box" v-model="fromValue1" v-bind:disabled="!usedTimeRange1" class="dayDataSingle_timeRangeInput">
                                <button type="button" class="btn dropdown-toggle" id="dropdownMenu4" data-toggle="dropdown" v-bind:disabled="!usedTimeRange1">
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu  pull-left scrollDropDown" role="menu" aria-labelledby="dropdownMenu4" v-model="fromValue1">
                                    <li role="presentation" v-for="item in hourDataSource2" v-on:click="fromValue1 = item.value">
                                        <a role="menuitem" tabindex="-1">{{item.dis}}</a>
                                    </li>
                                </ul>
                            </div>
                        </td>
                        <td>
                            到
                        </td>
                        <td>
                            <div class="dropdown">
                                <input name="box" v-model="toValue1" v-bind:disabled="!usedTimeRange1" class="dayDataSingle_timeRangeInput">
                                <button type="button" class="btn dropdown-toggle" id="dropdownMenu5" data-toggle="dropdown" v-bind:disabled="!usedTimeRange1">
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu  pull-left scrollDropDown" role="menu" aria-labelledby="dropdownMenu5" v-model="toValue1">
                                    <li role="presentation" v-for="item in hourDataSource2" v-on:click="toValue1 = item.value">
                                        <a role="menuitem" tabindex="-1">{{item.dis}}</a>
                                    </li>
                                </ul>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td><input type="checkbox" v-model="usedTimeRange2" v-bind:disabled="!usedTimeRange2Enable">启用时段2: </td>
                        <td>
                            从
                        </td>
                        <td>
                            <div class="dropdown">
                                <input name="box" v-model="fromValue2" v-bind:disabled="!usedTimeRange2" class="dayDataSingle_timeRangeInput">
                                <button type="button" class="btn dropdown-toggle" id="dropdownMenu6" data-toggle="dropdown" v-bind:disabled="!usedTimeRange2">
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu  pull-left scrollDropDown" role="menu" aria-labelledby="dropdownMenu6" v-model="fromValue2">
                                    <li role="presentation" v-for="item in hourDataSource2" v-on:click="fromValue2 = item.value">
                                        <a role="menuitem" tabindex="-1">{{item.dis}}</a>
                                    </li>
                                </ul>
                            </div>
                        </td>
                        <td>
                            到
                        </td>
                        <td>
                            <div class="dropdown">
                                <input name="box" v-model="toValue2" v-bind:disabled="!usedTimeRange2" class="dayDataSingle_timeRangeInput">
                                <button type="button" class="btn dropdown-toggle" id="dropdownMenu7" data-toggle="dropdown" v-bind:disabled="!usedTimeRange2">
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu  pull-left scrollDropDown" role="menu" aria-labelledby="dropdownMenu7" v-model="toValue2">
                                    <li role="presentation" v-for="item in hourDataSource2" v-on:click="toValue2 = item.value">
                                        <a role="menuitem" tabindex="-1">{{item.dis}}</a>
                                    </li>
                                </ul>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td><input type="checkbox" v-model="usedTimeRange3" v-bind:disabled="!usedTimeRange3Enable">启用时段3: </td>
                        <td>
                            从
                        </td>
                        <td>
                            <div class="dropdown">
                                <input name="box" v-model="fromValue3" v-bind:disabled="!usedTimeRange3" class="dayDataSingle_timeRangeInput">
                                <button type="button" class="btn dropdown-toggle" id="dropdownMenu8" data-toggle="dropdown" v-bind:disabled="!usedTimeRange3">
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu  pull-left scrollDropDown" role="menu" aria-labelledby="dropdownMenu8" v-model="fromValue3">
                                    <li role="presentation" v-for="item in hourDataSource2" v-on:click="fromValue3 = item.value">
                                        <a role="menuitem" tabindex="-1">{{item.dis}}</a>
                                    </li>
                                </ul>
                            </div>
                        </td>
                        <td>
                            到
                        </td>
                        <td>
                            <div class="dropdown">
                                <input name="box" v-model="toValue3" v-bind:disabled="!usedTimeRange3" class="dayDataSingle_timeRangeInput">
                                <button type="button" class="btn dropdown-toggle" id="dropdownMenu9" data-toggle="dropdown" v-bind:disabled="!usedTimeRange3">
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu  pull-left scrollDropDown" role="menu" aria-labelledby="dropdownMenu9" v-model="toValue3">
                                    <li role="presentation" v-for="item in hourDataSource2" v-on:click="toValue3 = item.value">
                                        <a role="menuitem" tabindex="-1">{{item.dis}}</a>
                                    </li>
                                </ul>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td><input type="checkbox" v-model="usedTimeRange4" v-bind:disabled="!usedTimeRange4Enable">启用时段4: </td>
                        <td>
                            从
                        </td>
                        <td>
                            <div class="dropdown">
                                <input name="box" v-model="fromValue4" v-bind:disabled="!usedTimeRange4" class="dayDataSingle_timeRangeInput">
                                <button type="button" class="btn dropdown-toggle" id="dropdownMenu10" data-toggle="dropdown" v-bind:disabled="!usedTimeRange4">
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu  pull-left scrollDropDown" role="menu" aria-labelledby="dropdownMenu10" v-model="fromValue4">
                                    <li role="presentation" v-for="item in hourDataSource2" v-on:click="fromValue4 = item.value">
                                        <a role="menuitem" tabindex="-1">{{item.dis}}</a>
                                    </li>
                                </ul>
                            </div>
                        </td>
                        <td>
                            到
                        </td>
                        <td>
                            <div class="dropdown">
                                <input name="box" v-model="toValue4" v-bind:disabled="!usedTimeRange4" class="dayDataSingle_timeRangeInput">
                                <button type="button" class="btn dropdown-toggle" id="dropdownMenu11" data-toggle="dropdown" v-bind:disabled="!usedTimeRange4">
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu  pull-left scrollDropDown" role="menu" aria-labelledby="dropdownMenu11" v-model="toValue4">
                                    <li role="presentation" v-for="item in hourDataSource2" v-on:click="toValue4 = item.value">
                                        <a role="menuitem" tabindex="-1">{{item.dis}}</a>
                                    </li>
                                </ul>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="modal-footer">
                @*<button type="button" class="btn btn-default" v-button_loaded>测试</button>*@
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" v-on:click="confirm()">提交更改</button>
            </div>
        </div>
    </div>
</div>
<script src="~/Scripts/ViewScript/Report/DMYDataModel.js" type="text/javascript"></script>
<script src="~/Scripts/ViewScript/Report/SourceQuantityModel.js" type="text/javascript"></script>
<script src="~/Scripts/ViewScript/Report/DayDataController.js" type="text/javascript"></script>